/**
 * CSS 重置样式
 * @description 重置浏览器默认样式，确保跨浏览器一致性
 */

/* 基础重置 */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  line-height: 1.15;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 标题重置 */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 600;
  line-height: 1.2;
}

/* 段落重置 */
p {
  margin: 0;
}

/* 列表重置 */
ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* 链接重置 */
a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

/* 按钮重置 */
button {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

button:focus {
  outline: none;
}

/* 输入框重置 */
input, textarea, select {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

input:focus, textarea:focus, select:focus {
  outline: none;
}

/* 表格重置 */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

th, td {
  padding: 0;
  text-align: left;
}

/* 图片重置 */
img {
  max-width: 100%;
  height: auto;
  border: none;
}

/* 表单元素重置 */
fieldset {
  margin: 0;
  padding: 0;
  border: none;
}

legend {
  padding: 0;
}

/* 其他元素重置 */
hr {
  margin: 0;
  border: none;
  border-top: 1px solid #e5e5e5;
}

blockquote {
  margin: 0;
  padding: 0;
}

/* 移除默认的焦点样式 */
:focus {
  outline: none;
}

/* 移除 iOS 上的点击高亮 */
* {
  -webkit-tap-highlight-color: transparent;
}

/* 滚动条样式重置 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* Firefox 滚动条 */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}